<template>
  <div>
    {{ paramA }}
  </div>
  <button @click="sendParam">给A组件传参</button>
</template>

<script setup lang=ts>
import {ref} from "vue"
import Bus from "@/Bus"
//const props = defineProps(["paramA"])

const paramA = ref<string>("")
Bus.on("on-click-b",(name:string)=>{
  paramA.value = name
})

const emit = defineEmits(["on-click-a"])
const sendParam = ()=>{
  emit("on-click-a","B组件参数")
}

</script>

<style scoped></style>